setActionView

open fun setActionView(item: MenuItem, view: View): MenuItem(source)

Deprecated

Use setActionView directly.

Set an action view for this menu item. An action view will be displayed in place of an automatically generated menu item element in the UI when this item is shown as an action within a parent.

Return

This Item so additional setters can be called.

Parameters

item

the item to change

view

View to use for presenting this item to the user.

See also


open fun setActionView(item: MenuItem, resId: Int): MenuItem(source)

Deprecated

Use setActionView directly.

Set an action view for this menu item. An action view will be displayed in place of an automatically generated menu item element in the UI when this item is shown as an action within a parent.

Note: Setting an action view overrides the action provider set via setActionProvider.

Return

This Item so additional setters can be called.

Parameters

item

the item to change

resId

Layout resource to use for presenting this item to the user.

See also